const mongoose = require("mongoose");
// mongoose.connect("mongodb://localhost/test",{useMongoClient:true});
mongoose.connect("mongodb://localhost:27017/test", { useNewUrlParser: true });
mongoose.Promise = Promise;

const Photo = mongoose.model("Photo",{
  albumName:String,
  imgSrc:{
    type:String,
    required:[true,"请上传相关产品图片。"],
  },
  createTime:Date,
});

module.exports = Photo;
